home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / logiso.000 / logiso / Utils / RCS / logiso_stop.c,v < prev    next >
Encoding:
Text File  |  1995-03-24  |  1.6 KB  |  109 lines

  1. head    1.3;
  2. access;
  3. symbols
  4.     VER_0_3:1.3
  5.     VER_0_2:1.2;
  6. locks; strict;
  7. comment    @ * @;
  8.  
  9.  
  10. 1.3
  11. date    95.03.24.11.43.35;    author coulter;    state Exp;
  12. branches;
  13. next    1.2;
  14.  
  15. 1.2
  16. date    95.03.01.07.10.23;    author coulter;    state Exp;
  17. branches;
  18. next    1.1;
  19.  
  20. 1.1
  21. date    95.02.18.08.36.38;    author coulter;    state Exp;
  22. branches;
  23. next    ;
  24.  
  25.  
  26. desc
  27. @stop isofs logging
  28. @
  29.  
  30.  
  31. 1.3
  32. log
  33. @Checkin version for 0.3 distribution.
  34. @
  35. text
  36. @
  37. /* logiso_stop.c  
  38.    Usage:    logiso_stop  cd-mount-point-or-file
  39.       Stop the isofs log.
  40. */
  41. /* (C) Copyright 1995 by Michael Coulter.  All rights reserved. */
  42.  
  43. #include <fcntl.h>
  44. #include <linux/iso_fs.h>
  45. #include <stdlib.h>
  46. #include <stdio.h>
  47. #include <sys/types.h>
  48. #include <unistd.h>
  49.  
  50. #define FALSE        0
  51. #define TRUE        1
  52.  
  53. extern void print_usage();
  54.  
  55. main(int argc, char** argv)
  56. {
  57.    struct iso_log_entry*    entry_p;
  58.    struct iso_log_entry*    entry_limit_p;
  59.    int                file_id;
  60.    FILE*            out_fp;
  61.    struct iso_log_info        iso_log_info;
  62.    int                result;
  63.    int                verbose;
  64.  
  65.    /* file_id = open("/mnt/system_cd/FileList", O_RDONLY); */
  66.    file_id = open(argv[1], O_RDONLY); 
  67.    if (file_id == -1) {
  68.       fprintf(stderr, "Unable to open file.\n");
  69.       exit(1);
  70.    }
  71.  
  72.    result = ioctl(file_id, ISO_IOC_STOPLOG);
  73.    if (result != 0) {
  74.       fprintf(stderr, 
  75.                 "Expected result 0, got %d.\n", 
  76.                 result);
  77.       exit(1);
  78.    }
  79.    fclose(out_fp);
  80.    return 0;
  81. } /* end main */
  82.  
  83. @
  84.  
  85.  
  86. 1.2
  87. log
  88. @Checkpoint files.  Can now compress cd_files.
  89. @
  90. text
  91. @d6 1
  92. @
  93.  
  94.  
  95. 1.1
  96. log
  97. @Checkpoint version before fixing /usr/bin install
  98. @
  99. text
  100. @d3 1
  101. a3 1
  102.    Usage:    logiso_stop  
  103. a8 1
  104. #include "/usr/include/linux/iso_fs.h"
  105. d30 1
  106. a30 1
  107.    file_id = open("/system_cd", O_RDONLY); 
  108. @
  109.